[Unit]
Description=Flanneld overlay address etcd agent
After=network.target
After=network-online.target
Wants=network-online.target
After=etcd.service
Before=docker.service

[Service]
Type=notify
ExecStart=/usr/local/bin/flanneld \
 -etcd-cafile=/etc/kubernetes/ssl/ca.pem \
 -etcd-certfile=/etc/kubernetes/ssl/flanneld.pem \
 -etcd-keyfile=/etc/kubernetes/ssl/flanneld-key.pem \
 -etcd-endpoints=https://{{etcd1}}:2379,https://{{etcd2}}:2379,https://{{etcd3}}:2379 \
 -etcd-prefix=/kubernetes/network \
 -iface={{ip}} \
 -ip-masq
ExecStartPost=/usr/local/bin/mk-docker-opts.sh -k DOCKER_NETWORK_OPTIONS -d /run/flannel/docker
Restart=always
RestartSec=5
StartLimitInterval=0

[Install]
WantedBy=multi-user.target
RequiredBy=docker.service
